from elasticsearch import Elasticsearch  
es = Elasticsearch("http://localhost:9200")  


from llama_index.tools.neo4j import Neo4jQueryToolSpec





doc = {'author': 'kimchy', 'text': 'Elasticsearch: cool. bonsai cool.', 'timestamp': '2023-01-01'}  
es.index(index="test-index", document=doc)  

res = es.search(index="test-index")  
print(res)

'''
https://elasticsearch-py.readthedocs.io/en/v9.1.1/api/elasticsearch.html
'''

 